{% extends "admin/common.html" %}
{% block content %}
<table width="1280" height="288"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td align="center" valign="top">
        <form  align="left"  method="post" action="">
         <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF">
           <tr>
              <td height="2" colspan="2">&nbsp;</td>
           </tr>
           <tr>
             <td width="200" height="10" align="left">{{form.search_creater(placeholder='请输taskid',class_='form-control')}}</td>
             <td width="10" height="20">&nbsp;</td>
             <td width="200" height="10"  align="left">{{form.csrf_token}}
               {{form.submit(class_='btn btn-success')}}
              </td>
             <td height="10" colspan="2">&nbsp;</td>
           </tr>
        </table>
      </form>
        <table width="100%"  border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="29" align="right">&nbsp;</td>
                <td width="10" background="{{url_for('static',filename='admin/images/manage_leftTitle_left.GIF')}}">&nbsp;</td>
                <td width="100%" align="center" background="{{url_for('static',filename='admin/images/manage_leftTitle_mid.gif')}}" class="word_white">
                    <b>taskid列表</b>
                </td>
                <td width="10" background="{{url_for('static',filename='admin/images/manage_leftTitle_right.gif')}}">&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
    </table>
      <table width="98%" height="192"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td valign="top"> <table width="100%" height="14"  border="0" cellpadding="0" cellspacing="0"> </table>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#FFFFFF" bordercolorlight="#E6E6E6">
              <tr bgcolor="#eeeeee">
                <td  height="25" align="center">taskid</td>
                <td  height="25" align="center">查看日志并评审</td>
                <td  height="25" align="center">评审结果</td>
              </tr>
              {% set task = [] %}
              {% for testlog in page_data.items %}
                  {% if testlog.task_id not in task %}
                    <tr style="padding:5px;">
                        <td height="25" align="center"> {{ testlog.task_id }} </td>
                        <td align="center">
                            <a href="{{ hardware_id }}/{{ testlog.task_id }}">查看日志</a>
                        </td>
                        <td align="center">
                            <a href="/home/review/{{ testlog.hardware_id }}/{{ testlog.task_id }}">查看评审结果</a>
                        </td>
                    </tr>
                  {% endif %}
                  {% if task.append(testlog.task_id) %}{% endif %}
              {% endfor %}
            </table>
        {% if page_data %}
          <tbody>
             <tr>
               <td height="30" align="right">
                 当前页数：[{{ page_data.page }}/{{ page_data.pages }}]&nbsp;
                 <a href="{{ url_for('admin.get_tasks', manu_id=manu_id, hardware_id=hardware_id, page=1) }}">第一页</a>
                 {% if page_data.has_prev %}
                 <a href="{{ url_for('admin.get_tasks', manu_id=manu_id, hardware_id=hardware_id, page=page_data.prev_num) }}">上一页</a>
                 {% endif %}
                 {% if page_data.has_next %} 　
                 <a href="{{ url_for('admin.get_tasks', manu_id=manu_id, hardware_id=hardware_id, page=page_data.next_num) }}">下一页</a>
                 {% endif %}　
                 <a href="{{ url_for('admin.get_tasks', manu_id=manu_id, hardware_id=hardware_id, page=page_data.pages) }}">最后一页&nbsp;</a>
               </td>
             </tr>
          </tbody>
        {% endif %}
          </td>
        </tr>
      </table>
</td>

{% endblock %}
